<div class="content">
	<div class="content_header_left">
		<!-- Start Content Header Left -->
		<?php include("ws_includes/1_ws_inc_priviligestring.php"); ?>
		<?php include("ws_includes/2_ws_inc_headerlabel.php"); ?>
		<!-- End Content Header Left -->
	</div>
	<div class="content_header_right">
		<!-- Start Content Header Right -->
		<?php if($privilegeAdd == 1) { ?>
		<a title="Add" href="action/act_productclass_addedit.php" class="nyroModal">
			<img src="<?php echo getURLdomain(); ?>/source/global/img/add-icon.png" width="24">
		</a>
		<?php } ?>
		<!-- End Content Header Right -->
	</div>
	<div style="clear:both;"></div>
	<div class="content_body">
		<!-- Start Content Body -->
		<?php
			$_SESSION['moduleid'] = 3;
			$_SESSION['modulename'] = "class";
			$_SESSION['submoduleid'] = 17;
			$sql = "select a.*, b.filename, c.productbrandposition, c.productbrandlabel
					from tbl_product_class a
						left join ms_file b
							on a.productclassurlimage = b.fileid and b.filerole = 'image' and b.stsrc = 'A'
						left join tbl_product_brand c
							on a.productbrandid = c.productbrandid and c.stsrc = 'A'
					where a.stsrc = 'A' order by c.productbrandposition asc, a.productclassposition asc";
			$exe = mysql_query($sql) or die(mysql_error());
			$num = mysql_num_rows($exe);
			
			if($num > 0)
			{
		?>
		<table id="table" border="1" cellpadding="2" cellspacing="0">
		<thead>
			<tr>
				<th filter="false">#</th>
				<th>Position</th>
				<th>Brand</th>
				<th>Name</th>
				<th>Label</th>
				<th filter-type='ddl'>Show Image</th>
				<th filter-type='ddl'>Status</th>
				<th filter="false">Preview</th>
				<th filter="false">Action</th>
			</tr>
		</thead>
		<?php
				$number_count = 1;
				while($row = mysql_fetch_array($exe))
				{
		?>
			<tr>
				<td><?php echo $number_count; ?></td>
				<td><?php echo $row['productbrandposition']."-".$row['productclassposition']; ?></td>
				<td><?php echo $row['productbrandlabel']; ?></td>
				<td><?php echo $row['productclassname']; ?></td>
				<td><?php echo $row['productclasslabel']; ?></td>
				<td>
					<?php if($row['productclassimagestatus'] == 1){echo "<span style='color:green;'>YES</span>";}else{echo "<span style='color:red;'>NO</span>";} ?>
				</td>
				<td>
					<?php if($row['productclassstatus'] == 1){echo "<span style='color:green;'>ON</span>";}else{echo "<span style='color:red;'>OFF</span>";} ?>
				</td>
				<td>
					<?php if(($row['productclassurlimage'] != "" || $row['productclassurlimage'] != null) && $row['productclassurlimage'] > 0){echo "<img src='".getURLdomain()."/upload/".file_string($row['filename'])."' style='max-width:100px; max-height:30px;' />";} ?>
				</td>
				<td>
					<div style="width:100%;">
						<div class="divRowActionCell">
							<div class="divRowAction">
								<a title="Preview" href="action/act_productclass_preview.php#<?php echo $row['productclassid']; ?>" class="nyroModal">
									<img src="<?php echo getURLdomain(); ?>/source/global/img/preview-icon.png" width="24">
								</a>
							</div>
							<?php if($privilegeEdit == 1) { ?>
							<div class="divRowAction">
								<a title="Edit" href="action/act_productclass_addedit.php#<?php echo $row['productclassid']; ?>" class="nyroModal">
									<img src="<?php echo getURLdomain(); ?>/source/global/img/edit-icon.png" width="24">
								</a>
							</div>
							<?php } ?>
							<?php if($privilegeDelete == 1) { ?>
							<div class="divRowAction">
								<a title="Delete" href="action/act_productclass_delete.php#<?php echo $row['productclassid']; ?>" class="nyroModal">
									<img src="<?php echo getURLdomain(); ?>/source/global/img/delete-icon.png" width="24">
								</a>
							</div>
							<?php } ?>
							<div class="clear"></div>
						</div>
					</div>
				</td>
			</tr>
		<?php
					$number_count++;
				}
			}
			else
			{
		?>
				No data !
		<?php
			}
		?>
		</table>
		<!-- End Content Body -->
	</div>
	<div style="clear:both;"></div>
</div>